import request from './request'
// 牧场新增
export const ranchAdd = (addRanch) => {
  return request({
    url: '/ranch/add',
    method: 'post',
    data: addRanch,
    headers: {
      isToken: true,
      repeatSubmit: false
    }
  })
}

// 牧场列表
export const ranchList = (params) => {
  return request({
    url: '/ranch/list',
    method: 'get',
    param: params,
    headers: {
      isToken: true,
      repeatSubmit: false
    }
  })
}

//  牧场详情
export const ranchDtail = (ranchId) => {
  return request({
    url: '/ranch/detail',
    method: 'get',
    param: {
      ranchId
    },
    headers: {
      isToken: true,
      repeatSubmit: false
    }
  })
}

// 修改牧场
export const ranchUpdate = (params) => {
  return request({
    url: '/ranch/update',
    method: 'post',
    data: params,
    headers: {
      isToken: true,
      repeatSubmit: false
    }
  })
}

// 获取全部牧场列表 （查询使用）
export const ranchRanchList = () => {
  return request({
    url: '/ranch/ranchList',
    method: 'get',
    headers: {
      isToken: true,
      repeatSubmit: false
    }
  })
}
